<?php


namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable;
use Watson\Validating\ValidatingTrait;
class Post extends Model
{
    use  Notifiable;
    use ValidatingTrait;
    use SoftDeletes;
    protected $table = 'posts';
    //
    protected $fillable = [
        'name', 'phone'
    ];
    protected $rules = [
        'name' => 'required|max:20|unique:companys',
    ];


    protected $validationMessages = [
        'name.required' => '职称名称必填',
        'name.max' => '职称名长度不得超过20个字符',
        'name.unique' => '该职称名称已经被注册过了'
    ];
}
